package com.chuanyang.driverh.mainmy;

import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import com.chuanyang.driverh.R;
import com.chuanyang.driverh.base.BaseTitleActivity;
import com.chuanyang.driverh.utils.ActivityUtil;
import com.chuanyang.driverh.utils.PrintUtil;

public class SettingActivity extends BaseTitleActivity {

    private RelativeLayout rl_account_secure;//账户与安全
    private RelativeLayout rl_no_disturb;//免打扰设置
    private RelativeLayout rl_msg_remind;//消息提醒
    private RelativeLayout rl_privacy;//隐私
    private RelativeLayout rl_about_us;//关于我们

    @Override
    protected int getContentResId() {
        return R.layout.my_act_setting;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        rl_account_secure = (RelativeLayout) findViewById(R.id.rl_account_secure);//账户与安全
        rl_no_disturb = (RelativeLayout) findViewById(R.id.rl_no_disturb);//免打扰设置
        rl_msg_remind = (RelativeLayout) findViewById(R.id.rl_msg_remind);//消息提醒
        rl_privacy = (RelativeLayout) findViewById(R.id.rl_privacy);//隐私
        rl_about_us = (RelativeLayout) findViewById(R.id.rl_about_us);//关于我们
    }



    @Override
    public void initData() {
        setBackImg();
        getTitleTextView().setText("基本设置");
    }

    @Override
    protected void initListener() {
        rl_account_secure.setOnClickListener(this);
        rl_no_disturb.setOnClickListener(this);
        rl_msg_remind.setOnClickListener(this);
        rl_privacy.setOnClickListener(this);
        rl_about_us.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        switch (v.getId()) {
            case R.id.rl_account_secure://账户与安全
                ActivityUtil.startActivity(activityContext,AccountSecureActivity.class);
                break;
            case R.id.rl_no_disturb://免打扰设置
                PrintUtil.toast(activityContext,"此功能尚未开通!");

                // startActivity(NoDisturbActivity.class);
                break;
            case R.id.rl_msg_remind://消息提醒
                PrintUtil.toast(activityContext,"此功能尚未开通!");

                // startActivity(MsgRemindActivity.class);
                break;
            case R.id.rl_privacy://隐私
                PrintUtil.toast(activityContext,"此功能尚未开通!");

                //startActivity(PrivacyActivity.class);
                break;
            case R.id.rl_about_us://关于我们
                PrintUtil.toast(activityContext,"此功能尚未开通!");

                // startActivity(AboutUsActivity.class);
                break;
        }
    }
}
